package zuoye;

import java.util.Scanner;

//�׳�
public class FactorialClass {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println("������һ����������");
		int n = sc.nextInt();
		Factorial(n);
	}
	public static void Factorial(int n) {
		int result = 1,sum = 0;
		for(int i = 1;i <= n; i++) {
			result = 1;
			for(int j = 1;j <= i;j ++) {
				result *= j;
			}
			sum += result;
		}
		System.out.println("1!+2!+��+"+n+"!=" + sum);
	}
}
